<?php

namespace App\Library\Address;

use Yj\Tool\Guzzle;

class AddressLibrary
{
    public static function analytic($lat,$lng){
        $data = Guzzle::init()->post('https://api.map.baidu.com/reverse_geocoding/v3/?ak=ura7mVknXLOXw2WXetfGGvex1fPmfsZr&output=json&coordtype=wgs84ll&location=' . $lat . ',' . $lng);
        $data = json_decode($data,true);
        if($data['status'] == '0'){
            return $data['result'];
        }else{
            _Error($data['status']);
        }
    }
}